// Step:3 conifg ECharts's path, link to echarts.js from current page.
    // Step:3 为模块加载器配置echarts的路径，从当前页面链接到echarts.js，定义所需图表路径
    require.config({
        paths:{ 
            echarts: '/Public/Admin/plugins/echarts/js'
        }
    });
    
    // Step:4 require echarts and use it in the callback.
    // Step:4 动态加载echarts然后在回调函数中开始使用，注意保持按需加载结构定义图表路径
    require(
        [
            'echarts',
            'echarts/chart/bar',
            'echarts/chart/line',
            'echarts/chart/map'
        ],
        function (ec) {
            //--- 每星期---
            var myChart = ec.init(document.getElementById('main'));
             var myChart2 = ec.init(document.getElementById('main2'));
             var myChart3 = ec.init(document.getElementById('main3'));
             var myChart4 = ec.init(document.getElementById('main4'));
             
            myChart.setOption({
            	 title : {
               text: '每周流量统计',
              textStyle: {
              	color: '#fdfefe'
              }
             
               }, 
               tooltip : {
                    trigger: 'axis'
                },
                legend: {
                    data:['独立IP','浏览PV'],
                    textStyle : {color: '#fdfefe'} 
                },
                toolbox: {
                    show : true,
                    feature : {
                        mark : {show: true},
                        dataView : {show: true, readOnly: false},
                        magicType : {show: true, type: ['line', 'bar']},
                        restore : {show: true},
                        saveAsImage : {show: true}
                    }
                },
              
                calculable : true,
               
                xAxis : [
                    {
                        type : 'category',
                        data : ['周日','周一','周二','周三','周四','周五','周六'],
                        axisLabel : {
                        	textStyle : {color: '#fdfefe'}
                        	
                        	
                        }
                          
                    }
                ],
                yAxis : [
                    {
                        type : 'value',
                        splitArea : {show : true},
                         axisLabel : {
                        	textStyle : {color: '#fdfefe'}
                        	
                        	
                        }
                         
                    }
                ],
                series : [
                    {
                        name:'独立IP',
                        type:'bar',
                        data:[2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3]
                    },
                    {
                        name:'浏览PV',
                        type:'bar',
                        data:[2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3]
                    }
                ], 
            });
            
            myChart2.setOption({
            	 title : {
               text: '每月流量统计',
              textStyle: {
              	color: '#fdfefe'
              }
             
               }, 
               tooltip : {
                    trigger: 'axis'
                },
                legend: {
                    data:['独立IP','浏览PV','网站广告点击量'],
                    textStyle : {color: '#fdfefe'} 
                },
                toolbox: {
                    show : true,
                    feature : {
                        mark : {show: true},
                        dataView : {show: true, readOnly: false},
                        magicType : {show: true, type: ['line', 'bar']},
                        restore : {show: true},
                        saveAsImage : {show: true}
                    }
                },
              
                calculable : true,
               
                xAxis : [
                    {
                        type : 'category',
                        data : ['第一周','第二周','第三周','第四周'],
                        axisLabel : {
                        	textStyle : {color: '#fdfefe'}
                        	
                        	
                        }
                          
                    }
                ],
                yAxis : [
                    {
                        type : 'value',
                        splitArea : {show : true},
                         axisLabel : {
                        	textStyle : {color: '#fdfefe'}
                        	
                        	
                        }
                         
                    }
                ],
                series : [
                    {
                        name:'独立IP',
                        type:'bar',
                        data:[2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3]
                    },
                    {
                        name:'浏览PV',
                        type:'bar',
                        data:[2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3]
                    },
                    {
                        name:'网站广告点击量',
                        type:'bar',
                        data:[2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3]
                    }
                ], 
            });
              myChart3.setOption({
            	 title : {
               text: '季度流量统计',
              textStyle: {
              	color: '#fdfefe'
              }
             
               }, 
               tooltip : {
                    trigger: 'axis'
                },
                legend: {
                    data:['独立IP','浏览PV','网站广告点击量'],
                    textStyle : {color: '#fdfefe'} 
                },
                toolbox: {
                    show : true,
                    feature : {
                        mark : {show: true},
                        dataView : {show: true, readOnly: false},
                        magicType : {show: true, type: ['line', 'bar']},
                        restore : {show: true},
                        saveAsImage : {show: true}
                    }
                },
              
                calculable : true,
               
                xAxis : [
                    {
                        type : 'category',
                        data : ['第一季度','第二季度','第三季度','第四季度'],
                        axisLabel : {
                        	textStyle : {color: '#fdfefe'}
                        	
                        	
                        }
                          
                    }
                ],
                yAxis : [
                    {
                        type : 'value',
                        splitArea : {show : true},
                         axisLabel : {
                        	textStyle : {color: '#fdfefe'}
                        	
                        	
                        }
                         
                    }
                ],
                series : [
                    {
                        name:'独立IP',
                        type:'bar',
                        data:[2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3]
                    },
                    {
                        name:'浏览PV',
                        type:'bar',
                        data:[2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3]
                    },
                    {
                        name:'网站广告点击量',
                        type:'bar',
                        data:[2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3]
                    }
                ], 
            });  
             
              myChart4.setOption({
            	 title : {
               text: '年度流量统计',
              textStyle: {
              	color: '#fdfefe'
              }
             
               }, 
               tooltip : {
                    trigger: 'axis'
                },
                legend: {
                    data:['独立IP','浏览PV','网站广告点击量'],
                    textStyle : {color: '#fdfefe'} 
                },
                toolbox: {
                    show : true,
                    feature : {
                        mark : {show: true},
                        dataView : {show: true, readOnly: false},
                        magicType : {show: true, type: ['line', 'bar']},
                        restore : {show: true},
                        saveAsImage : {show: true}
                    }
                },
              
                calculable : true,
               
                xAxis : [
                    {
                        type : 'category',
                        data : ['2008','2009','2010','2011','2012','2013','2014'],
                        axisLabel : {
                        	textStyle : {color: '#fdfefe'}
                        	
                        	
                        }
                          
                    }
                ],
                yAxis : [
                    {
                        type : 'value',
                        splitArea : {show : true},
                         axisLabel : {
                        	textStyle : {color: '#fdfefe'}
                        	
                        	
                        }
                         
                    }
                ],
                series : [
                    {
                        name:'独立IP',
                        type:'bar',
                        data:[2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3]
                    },
                    {
                        name:'浏览PV',
                        type:'bar',
                        data:[2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3]
                    },
                    {
                        name:'网站广告点击量',
                        type:'bar',
                        data:[2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3]
                    }
                ], 
            });
            
            
            
        }
    );